<!--
 * @Description: 
 * @Autor: Zhu_liangyu
 * @Date: 2020-05-09 10:52:56
--> 
<template>
  <div>
    <page-table
      rowKey="roleId"
      ref="rolePageTable"
      :query-api="role_queryPageApi"
      :delete-api="role_deletesApi"
      :addFormUrl="roleFormUrl"
      :columns="columns"
    >
      <template #customRoleName="{text,record}">
        <router-link :to="roleFormUrl+'/'+record.roleId">
          <span>{{text}}</span>
        </router-link>
      </template>
      <template #customIsUpdate="{text}">
        <a-tag v-if="text" color="#87d068">可以更新</a-tag>
        <a-tag v-else color="#f50">不能更新</a-tag>
      </template>
    </page-table>
  </div>
</template>
<script>
import {
  roleFormUrl,
  role_queryPageApi,
  role_deletesApi,
} from "@/api/org/role";
import { roleTableColumns } from "@/profile/org/role";
export default {
  name: "OrgRoleList",
  data() {
    return {
      columns: roleTableColumns,
      roleFormUrl,
      role_queryPageApi,
      role_deletesApi,
    };
  },
};
</script>
